<?php
namespace Core\CoreComponents\TasksManager;

/**
* This interface provide all accessible methods on task module
*
* @method ServiceResponse getTasks($user)
* @method ServiceResponse addTask($name)
* @method ServiceResponse deleteTask($id)
* @method ServiceResponse updateTask($id, $status)
*/
interface ITasks
{
	/**
	 * Get user's tasks
	 * 
	 * @param integer $user The account unique identifier for user
	 *
	 * @return ServiceResponse This response contains all tasks
	 */
    public function getTasks($user);
	
	/**
	 * Get all tasks
	 * 
	 * @return ServiceResponse This response contains all tasks
	 */
    public function getAllTasks();
	
	/**
	 * Add a task
	 *
	 * @param string $name The task name
	 * @param User $user The affected user
	 * 
	 * @return ServiceResponse This response contains the added task
	 */
	public function addTask($name, $user);
	
	/**
	 * Delete a task
	 * 
	 * @param integer $draining The unique task identifier
	 *
	 * @return ServiceResponse This response contains the deleted task
	 */
	public function deleteTask($id);
	
	/**
	 * Update a task
	 * 
	 * @param integer $id The task id 
	 * @param integer $status The new task status 
	 *
	 * @return ServiceResponse This response contains the updated task
	 */
	public function updateTask($id, $status);
}

?> 